package com.wicket.okrframework.web.contorller;

import cn.hutool.core.bean.BeanUtil;
import com.github.pagehelper.Page;
import com.github.pagehelper.page.PageMethod;
import com.wicket.okrframework.biz.service.MessageService;
import com.wicket.okrframework.biz.service.dto.req.*;
import com.wicket.okrframework.biz.service.dto.res.*;
import com.wicket.okrframework.common.ro.OkrResult;
import com.wicket.okrframework.common.util.CommonFunctionHelper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author ：
 * @date ：
 * 
 *
 * @version 1.0
 */
@RestController
@RequestMapping("/base/message/")
public class MessageController {

  @Autowired
  MessageService messageService;
/**
   * D1获取通道及成员基本信息(公共)
   */
    @PostMapping("obtainChannelAndMemberInfoCom")
    public OkrResult<ObtainChannelAndMemberInfoComRespDto> obtainChannelAndMemberInfoCom(@RequestBody @Validated ObtainChannelAndMemberInfoComReqDto reqDTO){
    return OkrResult.success(messageService.obtainChannelAndMemberInfoCom(reqDTO));
    }
/**
   * D1执行给部门管理者发通知(公共)
   */
    @PostMapping("implementToDeptManagerSendMsgCom")
    public OkrResult<ImplementToDeptManagerSendMsgComRespDto> implementToDeptManagerSendMsgCom(@RequestBody @Validated ImplementToDeptManagerSendMsgComReqDto reqDTO){
    return OkrResult.success(messageService.implementToDeptManagerSendMsgCom(reqDTO));
    }
/**
   * D1获取组织成员消息接收人信息(公共)
   */
    @PostMapping("obtainOrgMemberMsgReceiveInfoCom")
    public OkrResult<ObtainOrgMemberMsgReceiveInfoComRespDto> obtainOrgMemberMsgReceiveInfoCom(@RequestBody @Validated ObtainOrgMemberMsgReceiveInfoComReqDto reqDTO){
    return OkrResult.success(messageService.obtainOrgMemberMsgReceiveInfoCom(reqDTO));
    }
}
